import 'package:flutter6/widgets/playing.dart';

import '../../util/screen_util.dart';
import 'package:flutter/material.dart';

class Header extends StatelessWidget {
  const Header({super.key});

  @override
  Widget build(BuildContext context) {
    var screen = Screen(context);
    return Container(
      padding: EdgeInsets.only(
        left: screen.calc(24),
        right: screen.calc(24),
      ),
      child: Row(
        children: [
          Container(
            child: Image.asset(
              'assets/header_icon_music.png',
              width: screen.calc(72),
              height: screen.calc(72),
            ),
          ),
          Expanded(
            child: Stack(
              children: [
                Container(
                    padding: EdgeInsets.only(
                        left: screen.calc(30), right: screen.calc(30)),
                    height: screen.calc(72),
                    decoration: BoxDecoration(
                      borderRadius: BorderRadius.circular(screen.calc(36)),
                      color: Color(0xfff7f7f7),
                      // color: Colors.red,
                    ),
                    child: const TextField(
                      decoration: InputDecoration(
                        border: InputBorder.none,
                      ),
                    )),
                Positioned(
                  child: Container(
                      width: screen.calc(522),
                      height: screen.calc(72),
                      child: const Center(
                          child: Row(
                        mainAxisAlignment: MainAxisAlignment.center,
                        children: [
                          Icon(Icons.search, color: Color(0xff949494)),
                          Text('明天, 你好',
                              style: TextStyle(color: Color(0xffc5c5c5))),
                        ],
                      ))),
                ),
              ],
            ),
          ),
          Container(
              margin: EdgeInsets.only(left: screen.calc(32)),
              child: Playing()),
        ],
      ),
    );
  }
}
